<template>
  <div class="ICT-train">
    <no-ssr>
      <bread :breadList=breadList></bread>
    </no-ssr>
    <div class="ICT-train-main">
            <div style="float: left;position: relative;">
              <div class="main-nav">
                  <nav-list :list=selfNavList @tonav="navChenge" ref="nav-list" id='nav-flag'></nav-list>
              </div>
            </div>
            <div class="ICT-main-body main-body-flag">
                <train-ict :descript="descript" ref="train-ict" title="ICT培训" selfImg="/img/insert/college-ICT.jpg"></train-ict>
                <course-ict ref="course-ict"></course-ict>
                <lable-page-ict ref="lable-page-ict"></lable-page-ict>            
                <job-ict ref="job-ict" :employ=employList :overlay=overlayList></job-ict>
                <student-ict title="优秀学员" ref="student-ict" :studentList=studentData :maxShow=4></student-ict>
                <!-- <business-contact title="业务联系人" ref="business-contact" :businessItemList=contcatData></business-contact> -->
            </div>
        </div>
  </div>
</template>

<script>
import bread from '@/components/breadcrumb'
import navList from '@/components/navList'
import trainIct from '@/components/college/train_ict'
import courseIct from '@/components/college/course_ict'
import lablePageIct from '@/components/college/lable_page_ict'
// import trainData from './introChildren/trainData'
import jobIct from '@/components/college/job_ict'
import studentIct from '@/components/college/student_ict'
// import businessContact from '../publicComponent/businessContact'

import {collegeDataList, collegeEmployment, serviceOverlay, serviceContcat, collegeStudent, customEnterprise} from '@/api/getData'

export default {
  name: 'ICT_train',
  data () {
      return{
        breadList: [
          {
            text: '国科教育',
            routeName: 'college-intro'
            },
            {
            text: 'ICT培训',
            routeName: ''
            }
        ],
        selfNavList: [
            {
                text: 'ICT培训',
                ref: 'train-ict'
            },
            {
                text: '课程体系',
                ref: 'course-ict'
            },
            {
                text: '课程详情',
                ref: 'lable-page-ict'
            },
            {
                text: '就业方向',
                ref: 'job-ict'
            },
            {
                text: '优秀学员',
                ref: 'student-ict'
            }
        ],
        contcatData: [],
        employList: [],
        dataList: [],
        overlayList: [],
        studentData: [],
        descript: ''
      }
    
  },
  created(){
    
  },
  async mounted(){
    await collegeDataList.call(this).then(res=>{
        this.dataList = res;
    })
    
    await collegeEmployment.call(this,2).then(res=>{
        this.employList = res;
        
    })
    await serviceOverlay.call(this,4).then(res=>{
        this.overlayList = res;
    })
    // serviceContcat.call(this,4).then(res=>{
    //     this.contcatData = res;
    // })
    await collegeStudent.call(this).then(res=>{
        this.studentData = res;
    })
    await customEnterprise.call(this,2).then(res=>{
      this.descript = res[0].descr;
    })
    this.$refs['nav-list'].addNavEvent()
  },
  components: {
    bread,
    navList,
    trainIct,
    courseIct,
    lablePageIct,
    // trainData,
    jobIct,
    studentIct
    // businessContact
  },
  computed: {
    
  },
  methods: {
      navChenge(key){
        document.body.scrollTop = this.$refs[key].$el.offsetTop +230; 
　　    document.documentElement.scrollTop = this.$refs[key].$el.offsetTop +230;
      }
  }
}
</script>

<style lang="stylus" scoped>
.ICT-train{
  width: 1200px;
  padding-top: 20px;
  padding-bottom: 60px;
  margin: 0 auto; 
  border-bottom: 1px solid transparent;
}
.ICT-train-main{
    position: relative;
    .ICT-main-body{
        margin-left: 246px;
    }  
}
</style>
